home *** CD-ROM | disk | FTP | other *** search
Wrap
XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) NNNNAAAAMMMMEEEE XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww - The MainWindow widget class SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS #include <Xm/MainW.h> VVVVEEEERRRRSSSSIIIIOOOONNNN This page documents Motif 2.1. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN MainWindow provides a standard layout for the primary window of an application. This layout includes a MenuBar, a CommandWindow, a work region, a MessageWindow, and ScrollBars. Any or all of these areas are optional. The work region and ScrollBars in the MainWindow behave identically to the work region and ScrollBars in the ScrolledWindow widget. The user can think of the MainWindow as an extended ScrolledWindow with an optional MenuBar and optional CommandWindow and MessageWindow. In a fully loaded MainWindow, the MenuBar spans the top of the window horizontally. The CommandWindow spans the MainWindow horizontally just below the MenuBar, and the work region lies below the CommandWindow. The MessageWindow is below the work region. Any space remaining below the MessageWindow is managed in a manner identical to ScrolledWindow. The behavior of ScrolledWindow can be controlled by the ScrolledWindow resources. To create a MainWindow, first create the work region elements, a MenuBar, a CommandWindow, a MessageWindow, a horizontal ScrollBar, and a vertical ScrollBar widget, and then call XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwwwSSSSeeeettttAAAArrrreeeeaaaassss with those widget IDs. MainWindow can also create three Separator widgets that provide a visual separation of MainWindow's four components. The user can specify resources in a resource file for the automatically created gadgets that contain the MainWindow separators. The name of the first separator gadget is SSSSeeeeppppaaaarrrraaaattttoooorrrr1111; the second is SSSSeeeeppppaaaarrrraaaattttoooorrrr2222; and the third is SSSSeeeeppppaaaarrrraaaattttoooorrrr3333. MainWindow also provides the following three child types for layout at creation time: +o XXXXmmmmMMMMEEEENNNNUUUU____BBBBAAAARRRR +o XXXXmmmmCCCCOOOOMMMMMMMMAAAANNNNDDDD____WWWWIIIINNNNDDDDOOOOWWWW +o XXXXmmmmMMMMEEEESSSSSSSSAAAAGGGGEEEE____WWWWIIIINNNNDDDDOOOOWWWW MainWindow can use these child types at creation time instead of their associated resource values. MainWindow Page 1 (printed 10/3/02) XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) uses the _X_m_Q_T_m_e_n_u_S_y_s_t_e_m trait. DDDDeeeesssscccceeeennnnddddaaaannnnttttssss MainWindow automatically creates the descendants shown in the following table. An application can use XXXXttttNNNNaaaammmmeeeeTTTTooooWWWWiiiiddddggggeeeetttt to gain access to the named descendant. In addition, a user or an application can use the named descendant when specifying resource values. NNNNaaaammmmeeeedddd DDDDeeeesssscccceeeennnnddddaaaannnntttt CCCCllllaaaassssssss IIIIddddeeeennnnttttiiiittttyyyy ________________________________________________________________________________________________________________________________ HHHHoooorrrrSSSSccccrrrroooollllllllBBBBaaaarrrr XXXXmmmmSSSSccccrrrroooollllllllBBBBaaaarrrr horizontal scroll bar SSSSeeeeppppaaaarrrraaaattttoooorrrr1111 XXXXmmmmSSSSeeeeppppaaaarrrraaaattttoooorrrrGGGGaaaaddddggggeeeetttt optional first separator SSSSeeeeppppaaaarrrraaaattttoooorrrr2222 XXXXmmmmSSSSeeeeppppaaaarrrraaaattttoooorrrrGGGGaaaaddddggggeeeetttt optional second separator SSSSeeeeppppaaaarrrraaaattttoooorrrr3333 XXXXmmmmSSSSeeeeppppaaaarrrraaaattttoooorrrrGGGGaaaaddddggggeeeetttt optional third separator VVVVeeeerrrrttttSSSSccccrrrroooollllllllBBBBaaaarrrr XXXXmmmmSSSSccccrrrroooollllllllBBBBaaaarrrr vertical scroll bar CCCCllllaaaasssssssseeeessss MainWindow inherits behavior and resources from CCCCoooorrrreeee, CCCCoooommmmppppoooossssiiiitttteeee, CCCCoooonnnnssssttttrrrraaaaiiiinnnntttt, XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr, and XXXXmmmmSSSSccccrrrroooolllllllleeeeddddWWWWiiiinnnnddddoooowwww. The class pointer is _x_m_M_a_i_n_W_i_n_d_o_w_W_i_d_g_e_t_C_l_a_s_s. The class name is XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww. NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove the XXXXmmmmNNNN or XXXXmmmmCCCC prefix and use the remaining letters. To specify one of the defined values for a resource in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove the XXXXmmmm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss (S), retrieved by using XXXXttttGGGGeeeettttVVVVaaaalllluuuueeeessss (G), or is not applicable (N/A). XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNcommandWindow XmCCommandWindow Widget NULL CSG XmNcommandWindowLocation XmCCommandWindowLocation unsigned char ABOVE (SeeDesc.) CG XmNmainWindowMarginHeight XmCMainWindowMarginHeight Dimension 0 CSG XmNmainWindowMarginWidth XmCMainWindowMarginWidth Dimension 0 CSG XmNmenuBar XmCMenuBar Widget NULL CSG XmNmessageWindow XmCMessageWindow Widget NULL CSG XmNshowSeparator XmCShowSeparator Boolean False CSG XXXXmmmmNNNNccccoooommmmmmmmaaaannnnddddWWWWiiiinnnnddddoooowwww Specifies the widget to be laid out as the CommandWindow. This widget must have been Page 2 (printed 10/3/02) XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) previously created and managed as a child of MainWindow. XXXXmmmmNNNNccccoooommmmmmmmaaaannnnddddWWWWiiiinnnnddddoooowwwwLLLLooooccccaaaattttiiiioooonnnn Controls the position of the command window. XXXXmmmmCCCCOOOOMMMMMMMMAAAANNNNDDDD____AAAABBBBOOOOVVVVEEEE____WWWWOOOORRRRKKKKSSSSPPPPAAAACCCCEEEElocates the command window between the menu bar and the work window. XXXXmmmmCCCCOOOOMMMMMMMMAAAANNNNDDDD____BBBBEEEELLLLOOOOWWWW____WWWWOOOORRRRKKKKSSSSPPPPAAAACCCCEEEE locates the command window between the work window and the message window. XXXXmmmmNNNNmmmmaaaaiiiinnnnWWWWiiiinnnnddddoooowwwwMMMMaaaarrrrggggiiiinnnnHHHHeeeeiiiigggghhhhtttt Specifies the margin height on the top and bottom of MainWindow. This resource overrides any setting of the ScrolledWindow resource XXXXmmmmNNNNssssccccrrrroooolllllllleeeeddddWWWWiiiinnnnddddoooowwwwMMMMaaaarrrrggggiiiinnnnHHHHeeeeiiiigggghhhhtttt. XXXXmmmmNNNNmmmmaaaaiiiinnnnWWWWiiiinnnnddddoooowwwwMMMMaaaarrrrggggiiiinnnnWWWWiiiiddddtttthhhh Specifies the margin width on the right and left sides of MainWindow. This resource overrides any setting of the ScrolledWindow resource XXXXmmmmNNNNssssccccrrrroooolllllllleeeeddddWWWWiiiinnnnddddoooowwwwMMMMaaaarrrrggggiiiinnnnWWWWiiiiddddtttthhhh. XXXXmmmmNNNNmmmmeeeennnnuuuuBBBBaaaarrrr Specifies the widget to be laid out as the MenuBar. This widget must have been previously created and managed as a child of MainWindow. XXXXmmmmNNNNmmmmeeeessssssssaaaaggggeeeeWWWWiiiinnnnddddoooowwww Specifies the widget to be laid out as the MessageWindow. This widget must have been previously created and managed as a child of MainWindow. The MessageWindow is positioned at the bottom of the MainWindow. If this value is NULL, no message window is included in the MainWindow. XXXXmmmmNNNNsssshhhhoooowwwwSSSSeeeeppppaaaarrrraaaattttoooorrrr Displays separators between the components of the MainWindow when set to True. If set to False, no separators are displayed. IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss MainWindow inherits behavior and resources from the superclasses described in the following table. For a complete description of each resource, refer to the reference page for that superclass. XXXXmmmmSSSSccccrrrroooolllllllleeeeddddWWWWiiiinnnnddddoooowwww RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss Page 3 (printed 10/3/02) XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) XmNautoDragModel XmCAutoDragModel XtEnum XmAUTO_DRAG_ENABLED CSG XmNclipWindow XmCClipWindow Widget dynamic G XmNhorizontalScrollBar XmCHorizontalScrollBar Widget dynamic CSG XmNscrollBarDisplayPolicy XmCScrollBarDisplayPolicy unsigned char dynamic CSG XmNscrollBarPlacement XmCScrollBarPlacement unsigned char XmBOTTOM_RIGHT CSG XmNscrolledWindowMarginHeight XmCScrolledWindowMarginHeight Dimension 0 N/A XmNscrolledWindowMarginWidth XmCScrolledWindowMarginWidth Dimension 0 N/A XmNscrollingPolicy XmCScrollingPolicy unsigned char XmAPPLICATION_DEFINED CG XmNspacing XmCSpacing Dimension 4 CSG XmNtraverseObscuredCallback XmCCallback XtCallbackList NULL CSG XmNverticalScrollBar XmCVerticalScrollBar Widget dynamic CSG XmNvisualPolicy XmCVisualPolicy unsigned char dynamic G XmNworkWindow XmCWorkWindow Widget NULL CSG XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNforeground XmCForeground Pixel dynamic CSG XmNhelpCallback XmCCallback XtCallbackList NULL C XmNhighlightColor XmCHighlightColor Pixel dynamic CSG XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG XmNinitialFocus XmCInitialFocus Widget NULL CSG XmNlayoutDirection XmCLayoutDirection XmDirection dynamic CG XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG XmNpopupHandlerCallback XmCCallback XtCallbackList NULL C XmNshadowThickness XmCShadowThickness Dimension 0 CSG XmNstringDirection XmCStringDirection XmStringDirection dynamic CG XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG XmNtraversalOn XmCTraversalOn Boolean True CSG XmNunitType XmCUnitType unsigned char dynamic CSG XmNuserData XmCUserData XtPointer NULL CSG CCCCoooommmmppppoooossssiiiitttteeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNchildren XmCReadOnly WidgetList NULL G XmNinsertPosition XmCInsertPosition XtOrderProc NULL CSG XmNnumChildren XmCReadOnly Cardinal 0 G CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG XmNancestorSensitive XmCSensitive Boolean dynamic G XmNbackground XmCBackground Pixel dynamic CSG XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNborderWidth XmCBorderWidth Dimension 0 CSG XmNcolormap XmCColormap Colormap dynamic CG Page 4 (printed 10/3/02) XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww((((3333XXXX)))) XmNdepth XmCDepth int dynamic CG XmNdestroyCallback XmCCallback XtCallbackList NULL C XmNheight XmCHeight Dimension dynamic CSG XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG XmNscreen XmCScreen Screen * dynamic CG XmNsensitive XmCSensitive Boolean True CSG XmNtranslations XmCTranslations XtTranslations dynamic CSG XmNwidth XmCWidth Dimension dynamic CSG XmNx XmCPosition Position 0 CSG XmNy XmCPosition Position 0 CSG TTTTrrrraaaannnnssssllllaaaattttiiiioooonnnnssss MainWindow inherits translations from ScrolledWindow. RRRREEEELLLLAAAATTTTEEEEDDDD CCCCoooommmmppppoooossssiiiitttteeee(3), CCCCoooonnnnssssttttrrrraaaaiiiinnnntttt(3), CCCCoooorrrreeee(3), XXXXmmmmCCCCrrrreeeeaaaatttteeeeMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww(3), XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwwwSSSSeeeepppp1111(3), XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwwwSSSSeeeepppp2222(3), XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwwwSSSSeeeepppp3333(3), XXXXmmmmMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwwwSSSSeeeettttAAAArrrreeeeaaaassss(3), XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr(3), and XXXXmmmmSSSSccccrrrroooolllllllleeeeddddWWWWiiiinnnnddddoooowwww(3) Page 5 (printed 10/3/02)